home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / appshell / nsIAppShellService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  12KB  |  257 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAppShellService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAppShellService_h__
  6. #define __gen_nsIAppShellService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIXULWindow; /* forward declaration */
  18.  
  19. class nsIURI; /* forward declaration */
  20.  
  21. class nsIDOMWindowInternal; /* forward declaration */
  22.  
  23. class nsIAppShell; /* forward declaration */
  24.  
  25. struct JSContext;
  26.  
  27. /* starting interface:    nsIAppShellService */
  28. #define NS_IAPPSHELLSERVICE_IID_STR "93a28ba2-7e22-11d9-9b6f-000a95d535fa"
  29.  
  30. #define NS_IAPPSHELLSERVICE_IID \
  31.   {0x93a28ba2, 0x7e22, 0x11d9, \
  32.     { 0x9b, 0x6f, 0x00, 0x0a, 0x95, 0xd5, 0x35, 0xfa }}
  33.  
  34. class NS_NO_VTABLE nsIAppShellService : public nsISupports {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAPPSHELLSERVICE_IID)
  38.  
  39.   /**
  40.    * Create a window, which will be initially invisible.
  41.    * @param aParent the parent window.  Can be null.
  42.    * @param aUrl the contents of the new window.
  43.    * @param aChromeMask chrome flags affecting the kind of OS border
  44.    *                    given to the window. see nsIBrowserWindow for
  45.    *                    bit/flag definitions.
  46.    * @param aCallbacks interface providing C++ hooks for window initialization
  47.    *                   before the window is made visible.  Can be null.
  48.    *                   Deprecated.
  49.    * @param aInitialWidth width, in pixels, of the window.  Width of window
  50.    *                      at creation.  Can be overridden by the "width"
  51.    *                      tag in the XUL.  Set to NS_SIZETOCONTENT to force
  52.    *                      the window to wrap to its contents.
  53.    * @param aInitialHeight like aInitialWidth, but subtly different.
  54.    * @param aAppShell a widget "appshell" (event processor) to associate
  55.    *        with the new window
  56.    * @param aResult the newly created window is returned here.
  57.    */
  58.   enum { SIZE_TO_CONTENT = -1 };
  59.  
  60.   /* nsIXULWindow createTopLevelWindow (in nsIXULWindow aParent, in nsIURI aUrl, in PRUint32 aChromeMask, in long aInitialWidth, in long aInitialHeight, in nsIAppShell aAppShell); */
  61.   NS_IMETHOD CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRUint32 aChromeMask, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIAppShell *aAppShell, nsIXULWindow **_retval) = 0;
  62.  
  63.   /* [noscript] void createHiddenWindow (in nsIAppShell aAppShell); */
  64.   NS_IMETHOD CreateHiddenWindow(nsIAppShell *aAppShell) = 0;
  65.  
  66.   /* void destroyHiddenWindow (); */
  67.   NS_IMETHOD DestroyHiddenWindow(void) = 0;
  68.  
  69.   /**
  70.    * Return the (singleton) application hidden window, automatically created
  71.    * and maintained by this AppShellService.
  72.    * @param aResult the hidden window.  Do not unhide hidden window.
  73.    *                Do not taunt hidden window.
  74.    */
  75.   /* readonly attribute nsIXULWindow hiddenWindow; */
  76.   NS_IMETHOD GetHiddenWindow(nsIXULWindow * *aHiddenWindow) = 0;
  77.  
  78.   /**
  79.    * Return the (singleton) application hidden window, automatically created
  80.    * and maintained by this AppShellService.
  81.    * @param aResult the hidden window.  Do not unhide hidden window.
  82.    *                Do not taunt hidden window.
  83.    */
  84.   /* readonly attribute nsIDOMWindowInternal hiddenDOMWindow; */
  85.   NS_IMETHOD GetHiddenDOMWindow(nsIDOMWindowInternal * *aHiddenDOMWindow) = 0;
  86.  
  87.   /**
  88.    * Return the (singleton) application hidden window as an nsIDOMWindowInternal,
  89.    * and, the corresponding JavaScript context pointer.  This is useful
  90.    * if you'd like to subsequently call OpenDialog on the hidden window.
  91.    * @aHiddenDOMWindow the hidden window QI'd to type nsIDOMWindowInternal
  92.    * @aJSContext       the corresponding JavaScript context
  93.    */
  94.   /* [noscript] void getHiddenWindowAndJSContext (out nsIDOMWindowInternal aHiddenDOMWindow, out JSContext aJSContext); */
  95.   NS_IMETHOD GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aHiddenDOMWindow, JSContext * *aJSContext) = 0;
  96.  
  97.   /**
  98.    * Add a window to the application's registry of windows.  These windows
  99.    * are generally shown in the Windows taskbar, and the application
  100.    * knows it can't quit until it's out of registered windows.
  101.    * @param aWindow the window to register
  102.    * @note When this method is successful, it fires the global notification
  103.    *       "xul-window-registered"
  104.    */
  105.   /* void registerTopLevelWindow (in nsIXULWindow aWindow); */
  106.   NS_IMETHOD RegisterTopLevelWindow(nsIXULWindow *aWindow) = 0;
  107.  
  108.   /**
  109.    * Remove a window from the application's window registry. Note that
  110.    * this method won't automatically attempt to quit the app when
  111.    * the last window is unregistered. For that, see Quit().
  112.    * @param aWindow you see the pattern
  113.    */
  114.   /* void unregisterTopLevelWindow (in nsIXULWindow aWindow); */
  115.   NS_IMETHOD UnregisterTopLevelWindow(nsIXULWindow *aWindow) = 0;
  116.  
  117.   /**
  118.    * The appshell service needs to be informed of modal XUL windows currently
  119.    * open. Call this method as a window becomes modal or as it becomes
  120.    * nonmodal.
  121.    * @param aWindow no surprises here
  122.    * @param aModal true if aWindow is becoming modal
  123.    *               false if aWindow is becoming nonmodal (or being closed)
  124.    */
  125.   /* void topLevelWindowIsModal (in nsIXULWindow aWindow, in boolean aModal); */
  126.   NS_IMETHOD TopLevelWindowIsModal(nsIXULWindow *aWindow, PRBool aModal) = 0;
  127.  
  128. };
  129.  
  130. /* Use this macro when declaring classes that implement this interface. */
  131. #define NS_DECL_NSIAPPSHELLSERVICE \
  132.   NS_IMETHOD CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRUint32 aChromeMask, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIAppShell *aAppShell, nsIXULWindow **_retval); \
  133.   NS_IMETHOD CreateHiddenWindow(nsIAppShell *aAppShell); \
  134.   NS_IMETHOD DestroyHiddenWindow(void); \
  135.   NS_IMETHOD GetHiddenWindow(nsIXULWindow * *aHiddenWindow); \
  136.   NS_IMETHOD GetHiddenDOMWindow(nsIDOMWindowInternal * *aHiddenDOMWindow); \
  137.   NS_IMETHOD GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aHiddenDOMWindow, JSContext * *aJSContext); \
  138.   NS_IMETHOD RegisterTopLevelWindow(nsIXULWindow *aWindow); \
  139.   NS_IMETHOD UnregisterTopLevelWindow(nsIXULWindow *aWindow); \
  140.   NS_IMETHOD TopLevelWindowIsModal(nsIXULWindow *aWindow, PRBool aModal); 
  141.  
  142. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  143. #define NS_FORWARD_NSIAPPSHELLSERVICE(_to) \
  144.   NS_IMETHOD CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRUint32 aChromeMask, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIAppShell *aAppShell, nsIXULWindow **_retval) { return _to CreateTopLevelWindow(aParent, aUrl, aChromeMask, aInitialWidth, aInitialHeight, aAppShell, _retval); } \
  145.   NS_IMETHOD CreateHiddenWindow(nsIAppShell *aAppShell) { return _to CreateHiddenWindow(aAppShell); } \
  146.   NS_IMETHOD DestroyHiddenWindow(void) { return _to DestroyHiddenWindow(); } \
  147.   NS_IMETHOD GetHiddenWindow(nsIXULWindow * *aHiddenWindow) { return _to GetHiddenWindow(aHiddenWindow); } \
  148.   NS_IMETHOD GetHiddenDOMWindow(nsIDOMWindowInternal * *aHiddenDOMWindow) { return _to GetHiddenDOMWindow(aHiddenDOMWindow); } \
  149.   NS_IMETHOD GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aHiddenDOMWindow, JSContext * *aJSContext) { return _to GetHiddenWindowAndJSContext(aHiddenDOMWindow, aJSContext); } \
  150.   NS_IMETHOD RegisterTopLevelWindow(nsIXULWindow *aWindow) { return _to RegisterTopLevelWindow(aWindow); } \
  151.   NS_IMETHOD UnregisterTopLevelWindow(nsIXULWindow *aWindow) { return _to UnregisterTopLevelWindow(aWindow); } \
  152.   NS_IMETHOD TopLevelWindowIsModal(nsIXULWindow *aWindow, PRBool aModal) { return _to TopLevelWindowIsModal(aWindow, aModal); } 
  153.  
  154. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  155. #define NS_FORWARD_SAFE_NSIAPPSHELLSERVICE(_to) \
  156.   NS_IMETHOD CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRUint32 aChromeMask, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIAppShell *aAppShell, nsIXULWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTopLevelWindow(aParent, aUrl, aChromeMask, aInitialWidth, aInitialHeight, aAppShell, _retval); } \
  157.   NS_IMETHOD CreateHiddenWindow(nsIAppShell *aAppShell) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateHiddenWindow(aAppShell); } \
  158.   NS_IMETHOD DestroyHiddenWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DestroyHiddenWindow(); } \
  159.   NS_IMETHOD GetHiddenWindow(nsIXULWindow * *aHiddenWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHiddenWindow(aHiddenWindow); } \
  160.   NS_IMETHOD GetHiddenDOMWindow(nsIDOMWindowInternal * *aHiddenDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHiddenDOMWindow(aHiddenDOMWindow); } \
  161.   NS_IMETHOD GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aHiddenDOMWindow, JSContext * *aJSContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHiddenWindowAndJSContext(aHiddenDOMWindow, aJSContext); } \
  162.   NS_IMETHOD RegisterTopLevelWindow(nsIXULWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterTopLevelWindow(aWindow); } \
  163.   NS_IMETHOD UnregisterTopLevelWindow(nsIXULWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterTopLevelWindow(aWindow); } \
  164.   NS_IMETHOD TopLevelWindowIsModal(nsIXULWindow *aWindow, PRBool aModal) { return !_to ? NS_ERROR_NULL_POINTER : _to->TopLevelWindowIsModal(aWindow, aModal); } 
  165.  
  166. #if 0
  167. /* Use the code below as a template for the implementation class for this interface. */
  168.  
  169. /* Header file */
  170. class nsAppShellService : public nsIAppShellService
  171. {
  172. public:
  173.   NS_DECL_ISUPPORTS
  174.   NS_DECL_NSIAPPSHELLSERVICE
  175.  
  176.   nsAppShellService();
  177.  
  178. private:
  179.   ~nsAppShellService();
  180.  
  181. protected:
  182.   /* additional members */
  183. };
  184.  
  185. /* Implementation file */
  186. NS_IMPL_ISUPPORTS1(nsAppShellService, nsIAppShellService)
  187.  
  188. nsAppShellService::nsAppShellService()
  189. {
  190.   /* member initializers and constructor code */
  191. }
  192.  
  193. nsAppShellService::~nsAppShellService()
  194. {
  195.   /* destructor code */
  196. }
  197.  
  198. /* nsIXULWindow createTopLevelWindow (in nsIXULWindow aParent, in nsIURI aUrl, in PRUint32 aChromeMask, in long aInitialWidth, in long aInitialHeight, in nsIAppShell aAppShell); */
  199. NS_IMETHODIMP nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent, nsIURI *aUrl, PRUint32 aChromeMask, PRInt32 aInitialWidth, PRInt32 aInitialHeight, nsIAppShell *aAppShell, nsIXULWindow **_retval)
  200. {
  201.     return NS_ERROR_NOT_IMPLEMENTED;
  202. }
  203.  
  204. /* [noscript] void createHiddenWindow (in nsIAppShell aAppShell); */
  205. NS_IMETHODIMP nsAppShellService::CreateHiddenWindow(nsIAppShell *aAppShell)
  206. {
  207.     return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209.  
  210. /* void destroyHiddenWindow (); */
  211. NS_IMETHODIMP nsAppShellService::DestroyHiddenWindow()
  212. {
  213.     return NS_ERROR_NOT_IMPLEMENTED;
  214. }
  215.  
  216. /* readonly attribute nsIXULWindow hiddenWindow; */
  217. NS_IMETHODIMP nsAppShellService::GetHiddenWindow(nsIXULWindow * *aHiddenWindow)
  218. {
  219.     return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221.  
  222. /* readonly attribute nsIDOMWindowInternal hiddenDOMWindow; */
  223. NS_IMETHODIMP nsAppShellService::GetHiddenDOMWindow(nsIDOMWindowInternal * *aHiddenDOMWindow)
  224. {
  225.     return NS_ERROR_NOT_IMPLEMENTED;
  226. }
  227.  
  228. /* [noscript] void getHiddenWindowAndJSContext (out nsIDOMWindowInternal aHiddenDOMWindow, out JSContext aJSContext); */
  229. NS_IMETHODIMP nsAppShellService::GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aHiddenDOMWindow, JSContext * *aJSContext)
  230. {
  231.     return NS_ERROR_NOT_IMPLEMENTED;
  232. }
  233.  
  234. /* void registerTopLevelWindow (in nsIXULWindow aWindow); */
  235. NS_IMETHODIMP nsAppShellService::RegisterTopLevelWindow(nsIXULWindow *aWindow)
  236. {
  237.     return NS_ERROR_NOT_IMPLEMENTED;
  238. }
  239.  
  240. /* void unregisterTopLevelWindow (in nsIXULWindow aWindow); */
  241. NS_IMETHODIMP nsAppShellService::UnregisterTopLevelWindow(nsIXULWindow *aWindow)
  242. {
  243.     return NS_ERROR_NOT_IMPLEMENTED;
  244. }
  245.  
  246. /* void topLevelWindowIsModal (in nsIXULWindow aWindow, in boolean aModal); */
  247. NS_IMETHODIMP nsAppShellService::TopLevelWindowIsModal(nsIXULWindow *aWindow, PRBool aModal)
  248. {
  249.     return NS_ERROR_NOT_IMPLEMENTED;
  250. }
  251.  
  252. /* End of implementation class template. */
  253. #endif
  254.  
  255.  
  256. #endif /* __gen_nsIAppShellService_h__ */
  257.